<!DOCTYPE html>
<html lang="zh-CN">





<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/blogfavicon.ico">
  <link rel="icon" type="image/png" href="/img/blogfavicon.ico">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="触类旁通">
  <meta name="author" content="Charles Chan">
  <meta name="keywords" content="">
  <title>前端复习一 - 茶礼查理茬哩の世界</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.0/styles/github-gist.min.css" />
  

  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_yg9cfy8wd6.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_pjno9b9zyxs.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/js/utils.js" ></script>
<meta name="generator" content="Hexo 4.2.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>ReLoad</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/">
                <i class="iconfont icon-link-fill"></i>
                友链
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="view intro-2" id="background" parallax=true
         style="background: url('/img/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container text-center white-text fadeInUp">
            <span class="h2" id="subtitle">
              
            </span>

            
              
  <div class="mt-3 post-meta">
    <i class="iconfont icon-date-fill" aria-hidden="true"></i>
    <time datetime="2020-07-27 22:59">
      2020年7月27日 晚上
    </time>
  </div>


<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      907 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      13
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <div class="post-content mx-auto" id="post">
            
            <article class="markdown-body">
              <h1 id="START"><a href="#START" class="headerlink" title="START"></a>START</h1><h2 id="HTML复习"><a href="#HTML复习" class="headerlink" title="HTML复习"></a>HTML复习</h2><h3 id="基础标签"><a href="#基础标签" class="headerlink" title="基础标签"></a>基础标签</h3><ul>
<li><code>h</code>代表标题</li>
<li><code>p</code>代表段落</li>
<li><code>a</code>代表链接</li>
<li><code>img</code>代表图片</li>
<li><code>br</code>代表换行</li>
<li><code>hr</code>代表画线</li>
<li>注释使用<code>&lt;!--注释内容--&gt;</code></li>
</ul>
<pre><code class="hljs html"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>一号标题<span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>段落内容<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"http://www.baidu.com"</span>&gt;</span>This is a link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"w3school.jpg"</span> <span class="hljs-attr">width</span>=<span class="hljs-string">"104"</span> <span class="hljs-attr">height</span>=<span class="hljs-string">"142"</span> /&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">br</span> /&gt;</span>

<span class="hljs-comment">&lt;!--标签在 HTML 页面中创建水平线。--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">hr</span> /&gt;</span></code></pre>

<hr />

<h3 id="属性"><a href="#属性" class="headerlink" title="属性"></a>属性</h3><p>HTML 标签可以拥有属性。属性提供了有关 HTML 元素的更多的信息。</p>
<p>属性总是以名称/值对的形式出现，比如：<code>name=&quot;value&quot;</code>，上一小节的<code>href</code>也是属性名。</p>
<pre><code class="hljs html"><span class="hljs-comment">&lt;!-- 拥有关于对齐方式的附加信息。--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">align</span>=<span class="hljs-string">"center"</span>&gt;</span>  

<span class="hljs-comment">&lt;!--拥有关于背景颜色的附加信息。--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span> <span class="hljs-attr">bgcolor</span>=<span class="hljs-string">"yellow"</span>&gt;</span> 

<span class="hljs-comment">&lt;!--拥有关于表格边框的附加信息。--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">table</span> <span class="hljs-attr">border</span>=<span class="hljs-string">"1"</span>&gt;</span></code></pre>

<p>属性值应该始终被包括在引号内。双引号是最常用的，不过使用单引号也没有问题。</p>
<p>在某些个别的情况下，比如属性值本身就含有双引号，那么您必须使用单引号</p>
<p>最常见的属性为：</p>
<ul>
<li><code>id</code></li>
<li><code>style</code></li>
<li><code>class</code></li>
<li><code>title</code></li>
<li><code>dir</code></li>
<li><code>lang</code></li>
<li><code>xml:lang</code></li>
</ul>
<h4 id="样式属性警惕"><a href="#样式属性警惕" class="headerlink" title="样式属性警惕"></a>样式属性警惕</h4><p>由于样式一般会采用css进行设置，建议尽量不要使用样式属性。</p>
<p>例如：<code>text-align</code>、<code>font</code>、<code>bgcolor</code>。</p>
<hr />

<h3 id="文本格式化标签"><a href="#文本格式化标签" class="headerlink" title="文本格式化标签"></a>文本格式化标签</h3><ul>
<li><code>&lt;b&gt;</code>    定义粗体文本。</li>
<li><code>&lt;big&gt;</code>    定义大号字。</li>
<li><code>&lt;em&gt;</code>    定义着重文字。</li>
<li><code>&lt;i&gt;</code>    定义斜体字。</li>
<li><code>&lt;small&gt;</code>    定义小号字。</li>
<li><code>&lt;strong&gt;</code>    定义加重语气。</li>
<li><code>&lt;sub&gt;</code>    定义下标字。</li>
<li><code>&lt;sup&gt;</code>    定义上标字。</li>
<li><code>&lt;ins&gt;</code>    定义插入字。</li>
<li><code>&lt;del&gt;</code>    定义删除字。</li>
<li><code>&lt;s&gt;</code>    不赞成使用。使用 <code>&lt;del&gt;</code> 代替。</li>
<li><code>&lt;strike&gt;</code>    不赞成使用。使用 <code>&lt;del&gt;</code> 代替。</li>
<li><code>&lt;u&gt;</code>    不赞成使用。使用样式（style）代替。</li>
</ul>
<hr></hr>

<h3 id="lt-计算机输出-gt-标签"><a href="#lt-计算机输出-gt-标签" class="headerlink" title="&lt;计算机输出&gt;标签"></a>&lt;计算机输出&gt;标签</h3><ul>
<li><code>&lt;code&gt;</code>    定义计算机代码。</li>
<li><code>&lt;kbd&gt;</code>    定义键盘码。</li>
<li><code>&lt;samp&gt;</code>    定义计算机代码样本。</li>
<li><code>&lt;tt&gt;</code>    定义打字机代码。</li>
<li><code>&lt;var&gt;</code>    定义变量。</li>
<li><code>&lt;pre&gt;</code>    定义预格式文本。</li>
<li><code>&lt;listing&gt;</code>    不赞成使用。使用 <code>&lt;pre&gt;</code> 代替。</li>
<li><code>&lt;plaintext&gt;</code>    不赞成使用。使用 <code>&lt;pre&gt;</code> 代替。</li>
<li><code>&lt;xmp&gt;</code>    不赞成使用。使用 <code>&lt;pre&gt;</code> 代替。</li>
</ul>
<hr />

<h3 id="lt-引用-gt-标签"><a href="#lt-引用-gt-标签" class="headerlink" title="&lt;引用&gt;标签"></a>&lt;引用&gt;标签</h3><ul>
<li><code>&lt;abbr&gt;</code>    定义缩写。</li>
<li><code>&lt;acronym&gt;</code>    定义首字母缩写。</li>
<li><code>&lt;address&gt;</code>    定义地址。</li>
<li><code>&lt;bdo&gt;</code>    定义文字方向。</li>
<li><code>&lt;blockquote&gt;</code>    定义长的引用。</li>
<li><code>&lt;q&gt;</code>    定义短的引用语。</li>
<li><code>&lt;cite&gt;</code>    定义引用、引证。</li>
<li><code>&lt;dfn&gt;</code>    定义一个定义项目。</li>
</ul>
<pre><code class="hljs html"><span class="hljs-comment">&lt;!--缩写--&gt;</span>
The <span class="hljs-tag">&lt;<span class="hljs-name">abbr</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"People's Republic of China"</span>&gt;</span>PRC<span class="hljs-tag">&lt;/<span class="hljs-name">abbr</span>&gt;</span> was founded in 1949.

<span class="hljs-comment">&lt;!--一些地方可能不能用--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">acronym</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"World Wide Web"</span>&gt;</span>WWW<span class="hljs-tag">&lt;/<span class="hljs-name">acronym</span>&gt;</span>

<span class="hljs-comment">&lt;!--地址--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">address</span>&gt;</span>
Written by <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"mailto:webmaster@example.com"</span>&gt;</span>Donald Duck<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>.<span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span> 
Visit us at:<span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
Example.com<span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
Box 564, Disneyland<span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
USA
<span class="hljs-tag">&lt;/<span class="hljs-name">address</span>&gt;</span>

<span class="hljs-comment">&lt;!--文字从左往右  ltr 从右向左 rtl--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">bdo</span> <span class="hljs-attr">dir</span>=<span class="hljs-string">"rtl"</span>&gt;</span>Here is some text<span class="hljs-tag">&lt;/<span class="hljs-name">bdo</span>&gt;</span>

<span class="hljs-comment">&lt;!--长文引用--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">blockquote</span>&gt;</span>
Here is a long quotation here is a long quotation here is a long quotation 
here is a long quotation here is a long quotation here is a long quotation 
here is a long quotation here is a long quotation here is a long quotation.
<span class="hljs-tag">&lt;/<span class="hljs-name">blockquote</span>&gt;</span>

<span class="hljs-comment">&lt;!--添加引号--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">q</span>&gt;</span>Here is a short quotation here is a short quotation<span class="hljs-tag">&lt;/<span class="hljs-name">q</span>&gt;</span>

<span class="hljs-comment">&lt;!--数学变量格式--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Einstein wrote:<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">var</span>&gt;</span>E = m c<span class="hljs-tag">&lt;<span class="hljs-name">sup</span>&gt;</span>2<span class="hljs-tag">&lt;/<span class="hljs-name">sup</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">var</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span></code></pre>

<h1 id="END"><a href="#END" class="headerlink" title="END"></a>END</h1>
            </article>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/HTML/">HTML</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" target="_blank" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <div class="post-prev col-6">
                    
                    
                      <a href="/2020/07/28/html2/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">前端复习二</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </div>
                  <div class="post-next col-6">
                    
                    
                      <a href="/2020/05/17/jvm1/">
                        <span class="hidden-mobile">JVM的阅读笔记-自动内存管理机制篇</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </div>
                </div>
              
            </div>

            
          </div>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div id="tocbot"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  

  <footer class="mt-5">
  <div class="text-center py-3">
    <div>
      <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a>
      <i class="iconfont icon-love"></i>
      <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener">
        <span>Fluid</span></a>
    </div>
    

    

    
  </div>
</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/js/clipboard-use.js" ></script>







  <script  src="https://cdn.staticfile.org/tocbot/4.11.1/tocbot.min.js" ></script>
  <script>
    $(document).ready(function () {
      var boardCtn = $('#board-ctn');
      var boardTop = boardCtn.offset().top;

      tocbot.init({
        tocSelector: '#tocbot',
        contentSelector: 'article.markdown-body',
        headingSelector: 'h1,h2,h3,h4,h5,h6',
        linkClass: 'tocbot-link',
        activeLinkClass: 'tocbot-active-link',
        listClass: 'tocbot-list',
        isCollapsedClass: 'tocbot-is-collapsed',
        collapsibleClass: 'tocbot-is-collapsible',
        collapseDepth: 0,
        scrollSmooth: true,
        headingsOffset: -boardTop
      });
      if ($('.toc-list-item').length > 0) {
        $('#toc').css('visibility', 'visible');
      }
    });
  </script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "前端复习一&nbsp;",
      ],
      cursorChar: "_",
      typeSpeed: 70,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.2.2/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "right",
      visible: "hover",
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    var path = "/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>




















</body>
</html>
